package lx.springBoot.dao;

import lx.springBoot.entry.User;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by lx on 2017/7/5.
 */
@Component("userDao")
public interface UserDAO extends BaseDao<User>{

    public Long count();

    public List<User> findByLoginName(String loginName);

    @Cacheable(value = "userId",keyGenerator = "wiselyKeyGenerator")
    public User findById(Long userId);
}
